'use strict';
/**
 * Created by zhouzhongyuan on 2016/1/6.
 */

$app.controller(function (jquery) {
  var $         = jquery;
  var actions   = {};

  actions.nihao = function () {
    $app.view([["home/view/index", "home/view/index1"]], function (nihaoview, nihaoview1) {
      var aa  = new nihaoview;
      var aa1 = new nihaoview1;
      $("body").append(aa.render().$el);
      $("body").append(aa1.render().$el);
      $app.view([["home/view/index", "home/view/index1"]], function (nihaoview, nihaoview1) {
        var aa  = new nihaoview;
        var aa1 = new nihaoview1;
        $("body").append(aa.render().$el);
        $("body").append(aa1.render().$el);
      });
    });
  };

  actions.index = function () {
    console.log("index");
    console.log(1);
    $("view[view-id='body']").html("<a href='#auth'>auth</a>");
  };


  return actions;
});
